import 'package:chat_client/utils/show_messae.dart' show popError;
import 'package:chat_client/widgets/c_alert_message.dart' show Message;
import 'package:chat_client/widgets/c_loading.dart' show Loading;
import 'package:flutter/material.dart' show GlobalKey, NavigatorState;

class GlobaManager {
  static init(GlobalKey<NavigatorState> navigatorKey) {
    try {
      // 初始化消息提示通知
      Message.initialize(navigatorKey);
      // 初始化loading
      Loading.initialize(navigatorKey: navigatorKey);
    } catch (e) {
      popError('notify初始化失败', e.toString());
    }
  }
}
